<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
<script src="./js/shuju.js"></script>
<script>

    var arr=[];
    for (var i=0;i<xianlu.length;i++){
        function randomRgbaColor() { //随机生成RGBA颜色
            var r = Math.floor(Math.random() * 256); //随机生成256以内r值
            var g = Math.floor(Math.random() * 256); //随机生成256以内g值
            var b = Math.floor(Math.random() * 256); //随机生成256以内b值
            var alpha = Math.random(); //随机生成1以内a值
            return `rgb(${r},${g},${b},${alpha})`; //返回rgba(r,g,b,a)格式颜色
        }
         var a=randomRgbaColor()
        arr.push(a);
    }

    console.log(arr);


</script>
</body>
</html>